const nodata = require('../tw-lib-base/no-data/props')
module.exports = {
  type: {
    type: String,
    default: 'line',
    name: '图表类型',
    filedType: 'select',
    options: [
      {
        name: '折线图',
        value: 'line'
      },
      {
        name: '柱状图',
        value: 'bar'
      }
    ],
    // 是否支持多选，支持多选时default要指定为数组
    multiple: false
  },

  seriesIsRow: {
    type: Boolean,
    default: false,
    name: '行列互换',
    filedType: 'switch'
  },
  height: {
    type: String,
    default: '300px',
    name: '图表容器高度',
    filedType: 'string'
  },

  data: {
    type: Array,
    default () {
      return [
        ['姓名', '张思睿', '李福娥', '王飞虎'],
        ['语文', 43.3, 85.8, 93.7],
        ['数学', 83.1, 73.4, 55.1],
        ['英语', 86.4, 65.2, 82.5]
      ]
    },
    name: '图表数据集',
    filedType: 'api'
  },

  bgColor: {
    type: String,
    default: '#fff',
    name: '背景颜色',
    filedType: 'color'
  },

  axisLineColor: {
    type: String,
    default: '#d1d1d9',
    name: '轴线颜色',
    filedType: 'color'
  },

  axisLabelColor: {
    type: String,
    default: '#666',
    name: '轴线刻度颜色',
    filedType: 'color'
  },

  splitLineColor: {
    type: String,
    default: '#d1d1d9',
    name: '分隔线颜色',
    filedType: 'color'
  },

  boundaryGap: {
    type: Boolean,
    default: true,
    name: '坐标轴留白',
    filedType: 'switch'
  },

  icon: {
    type: String,
    default: 'roundRect',
    name: '数据类型',
    filedType: 'select',
    options: [
      {
        name: '方块',
        value: 'rect'
      },
      {
        name: '圆点',
        value: 'circle'
      },
      {
        name: '圆角方块',
        value: 'roundRect'
      }
    ]
  },
  triggerType: {
    type: String,
    default: 'axis',
    name: '触发类型',
    filedType: 'select',
    options: [
      {
        name: 'axis',
        value: 'axis'
      },
      {
        name: 'item',
        value: 'item'
      }
    ],
    // 是否支持多选，支持多选时default要指定为数组
    multiple: false
  },

  colors: {
    type: Array,
    default () {
      return [
        '#657df5',
        '#ffb336',
        '#4ac7ff',
        '#2bd3bd',
        '#96e388',
        '#fecd63'
      ]
    },
    name: '调色板',
    nameTip: '图表按此处指定的值循环取色',
    filedType: 'list',
    subType: 'color',
    subDefault: '#2bd3bd',
    max: 6
  },
  ...nodata
}
